package evolutionaryballoons.behavior.genetic;

import evolutionaryballoons.Balloon;
import evolutionaryballoons.Points;
import evolutionaryballoons.behavior.Behavior;

public class BalloonSimulation {
	private Balloon balloon;
	private Behavior behavior;
	private Points points;
	public int tick;
	
	public BalloonSimulation(Balloon balloon, Points points, Behavior behavior) {
		this.balloon = balloon;
		this.points = points;
		this.behavior = behavior;
		this.tick = 0;
	}
	
	public boolean isActive() {
		return balloon.isInWorld();
	}
	
	public void step() {
		behavior.act();
		balloon.act();
		balloon.drift();
		tick++;
	}
	
	public int getCollected() {
		return points.getCollected();
	}

	public int getCost() {
		return balloon.cost;
	}
}
